void PPMInitialization()
{  
  TCCR1A = 0x00;	   // COM1A1=0, COM1A0=0 => Disconnect Pin OC1 from Timer/Counter 1 -- PWM11=0,PWM10=0 => PWM Operation disabled
  TCCR1B = 0x02;	   // 16MHz clock with prescaler means TCNT1 increments every .5 uS (cs11 bit set
  attachInterrupt(1, ppm_fun, RISING);
  pinMode(3,INPUT);
}

// Defaults after init are 434.0MHz, modulation GFSK_Rb2_4Fd36
void RF22Initialization()
{
  if (!rf22.init()) {
     //Serial.println("RF22 init failed");
  }

  rf22.spiWrite(RF22_REG_0D_GPIO_CONFIGURATION2, B00100011); //set GPIO2 to direct input, pullup
  rf22.setFrequency(458.5,0.01);
  rf22.setTxPower(RF22_TXPOW_1DBM);
  //rf22.setModemConfig(RF22::GFSK_Rb12Fd15);
  rf22.setModemConfig(RF22::GFSK_Rb38_4Fd19_6);

  pinMode(redLED, OUTPUT);
  pinMode(greenLED, OUTPUT);

  digitalWrite(greenLED, HIGH);
}



